package com.pureut.system.controller;

import com.pureut.common.core.web.controller.BaseController;
import com.pureut.common.core.web.domain.AjaxResult;
import com.pureut.common.core.web.page.TableDataInfo;
import com.pureut.common.security.annotation.RequiresPermissions;
import com.pureut.system.domain.dto.MaterialWasteDto;
import com.pureut.system.domain.dto.PasswordVerifyDto;
import com.pureut.system.domain.vo.MaterialWasteVo;
import com.pureut.system.domain.vo.PasswordVerifyVo;
import com.pureut.system.service.PasswordVerifyService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/***
 * 密码校验控制层
 * Author:C
 * Date:2022/12/14 9:39
 * @DESC
 */
@RestController
@RequestMapping("/password-verify")
public class PasswordVerifyController extends BaseController {


    @Resource
    PasswordVerifyService passwordVerifyService;

    /**
     * 获取密码校验
     */
    @ApiOperation("查询密码校验")
    @GetMapping("/list")
    public PasswordVerifyDto list(PasswordVerifyVo passwordVerifyVo)
    {
        PasswordVerifyDto passwordVerifyDto = passwordVerifyService.selectPasswordVerifyList(passwordVerifyVo);
        return passwordVerifyDto;
    }

    /**
     * 密码校验
     */
    @PostMapping("/verify")
    public AjaxResult verify(@RequestBody PasswordVerifyVo passwordVerifyVo){
        return toAjax(passwordVerifyService.verify(passwordVerifyVo));
    }
}
